<template>
  <div id="inAnalysisRoot" @click="clickShow">
    <!-- header -->
    <HeaderAly />
    <!-- 内容 -->
    <div class="myContent">
      <!--达人资源库  -->
      <TalentLibrary
        v-if="$route.params.model == 'talentLibrary'"
        ref="mychild"
      />

      <!-- 智能找达人 -->
      <FindTalent v-if="$route.params.model == 'findTalent'" />
      <TalentHome v-if="$route.params.model == 'talentHome'" />
      <SeekTalentDetails v-if="$route.params.model == 'seekTalentDetails'" />
      <keep-alive>
        <SearchGoodsAly01 v-if="$route.params.model == 'SearchGoodsAly01'" />
      </keep-alive>
      <!-- <SearchGoodsAly02 v-if="$route.params.model == 'SearchGoodsAly02'" /> -->
      <Budget v-if="$route.params.model == 'budget'" />
      <!-- <keep-alive> -->
      <MatchResult v-if="$route.params.model == 'MatchResult'" />
      <!-- </keep-alive> -->
      <MatchHistory v-if="$route.params.model == 'matchHistory'" />
      <!-- 账号诊断 -->
      <DiagnosisIndex v-if="$route.params.model == 'diagnosisIndex'" />
      <DiagnosisSearch v-if="$route.params.model == 'diagnosisSearch'" />
      <DiagnosisDetails v-if="$route.params.model == 'diagnosisDetails'" />
      <DiagnosisHishtory v-if="$route.params.model == 'diagnosisHishtory'" />
      <DiagnosisResult v-if="$route.params.model == 'diagnosisResult'" />
      <!--智能找商品 -->
      <Goodsindex v-if="$route.params.model == 'three'"></Goodsindex>
      <Goods02 v-if="$route.params.model == 'SearchGoods'"></Goods02>
      <Goods03 v-if="$route.params.model == 'expertList'"></Goods03>
      <Goods05 v-if="$route.params.model == 'historyGoods'"></Goods05>
      <Goods06 v-if="$route.params.model == 'resultList'"></Goods06>
    </div>
  </div>
</template>

<script>
const path = require("path");
const files = require.context("./components", false, /\.vue$/);
// modules 里面放的注册的组件名
const modules = {};
files.keys().forEach((key) => {
  const name = path.basename(key, ".vue");
  modules[name] = files(key).default || files(key);
});
import TalentLibrary from '@/pages/wang/inAnalysis/talentLibraryn.vue';
import FindTalent from '@/pages/wang/inAnalysis/findTalent/findTalentRoot.vue';
import SearchGoodsAly01 from '@/pages/wang/inAnalysis/findTalent/searchGoodsAly01.vue';
import Budget from '@/pages/wang/inAnalysis/findTalent/budget.vue';
import MatchResult from '@/pages/wang/inAnalysis/findTalent/matchResult.vue';
import MatchHistory from '@/pages/wang/inAnalysis/findTalent/matchHistory.vue';
// 新的智能找达人
import TalentHome from "@/pages/wang/inAnalysis/NewFindTalent/talentHome.vue";
import SeekTalentDetails from "@/pages/wang/inAnalysis/NewFindTalent/seekTalentDetails.vue";

import HeaderAly from "./HeaderAly.vue";
//智能找商品
import Goodsindex from "@/pages/li/intellectGoods/goodsindex.vue";
import Goods02 from "@/pages/li/intellectGoods/goods02.vue";
import Goods03 from "@/pages/li/intellectGoods/goods03.vue";
import Goods05 from "@/pages/li/intellectGoods/goods05.vue";
import Goods06 from "@/pages/li/intellectGoods/goods06.vue";

export default {
  name: "inAnalysisRoot",
  components: {
    TalentLibrary,

    FindTalent,
    SearchGoodsAly01,
    SeekTalentDetails,
    Budget,
    MatchHistory,
    MatchResult,
    HeaderAly,
    Goodsindex,
    Goods02,
    Goods03,
    Goods05,
    Goods06,
    TalentHome,

    ...modules,
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},

  methods: {
    clickShow() {
      if (this.$route.params.model == "talentLibrary") {
        this.$refs.mychild.thisFalse();
      }
    },
  },
};
</script>
<style lang="less" scoped>
//@import url();
#inAnalysisRoot {
  box-sizing: border-box;
  width: 100%;
  background-color: #f5f5f5;
  // 内容
  .myContent {
    width: 1200px;
    margin: 0 auto;
  }
}
</style>
